package tech.aistar.day06.homework01;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2021/3/16 9:03 上午
 */
public class TestShape {
    public static void main(String[] args) {
        Shape[] shapes = new Shape[3];
        Shape c = new Circle(10);

        Shape r = new Rect(10,5);

        Shape s = new Square(10);

        shapes[0] = c;
        shapes[1] = r;
        shapes[2] = s;

        for (Shape shape : shapes) {
            System.out.println(shape.girth());

            System.out.println(shape.area());
        }
    }
}
